package org.jeecg.modules.zonglzp.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.zonglzp.entity.DepartmentEntity;

import java.util.List;

public interface DepartmentMapper {


    //新增部门
    int addDepartment(DepartmentEntity entity);

    //查询部门
    IPage<DepartmentEntity> getDepartment(Page<DepartmentEntity> page, @Param("customerId") String customerId);


    //删除部门
    int deleteDepartment(@Param("id") int id);

    //编辑部门信息
    int updateDepartment(DepartmentEntity entity);

    //通过部门名称查询部门是否已经存在
    String getdepartnamebyname(@Param("departName") String departName,@Param("customerId") String customerId);

    //查询全部部门 以list返回
    List<DepartmentEntity> getAllDepartmentList(@Param("customerId") String customerId);


    //编辑部门时候的详情回显
    DepartmentEntity getDepartmentbyId(@Param("id") int id);

    int getdepartIdbyname(@Param("departName") String departName,@Param("customerId") String customerId);
}
